package com.sdust.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class RabbitMqConfig {

    @Bean
    public DirectExchange directExchange2() {
        return new DirectExchange("testDirectExchange2");
    }

    @Bean
    public Queue testBindingQueue3() {
        return new Queue("testDirect.queue3");
    }

    @Bean
    public Binding directBinding3(Queue testBindingQueue3, DirectExchange directExchange2) {
        return BindingBuilder.bind(testBindingQueue3).to(directExchange2).withQueueName();
    }

    @Bean
    public Queue testBindingQueue4() {
        return new Queue("testDirect.queue4");
    }

    @Bean
    public Binding directBinding2(Queue testBindingQueue4, DirectExchange directExchange2) {
        return BindingBuilder.bind(testBindingQueue4).to(directExchange2).withQueueName();
    }

}
